package com.pap.datas.area.auto.mapper;

import com.pap.base.mapper.PapBaseMapper;
import com.pap.datas.agent.area.dto.BaseAreaLeafDTO;
import com.pap.datas.agent.area.dto.BaseAreaTreeNodeVO;
import com.pap.datas.area.auto.entity.BaseArea;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;;

public interface BaseAreaMapper extends PapBaseMapper<BaseArea> {
	
	int deleteByPrimaryKey(String id);

	int selectCountByMap(Map<Object, Object> map);

	List<BaseArea> selectListByMap(Map<Object, Object> map);

	BaseArea selectByPrimaryKeyAndTableName(@Param("id") String id, @Param("dynamicTableName") String dynamicTableName);

	int deleteByPrimaryKeyAndTableName(@Param("id") String id, @Param("dynamicTableName") String dynamicTableName);

	int insert(BaseArea record);

	int insertSelective(BaseArea record);

	BaseArea selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(BaseArea record);

	int updateByPrimaryKey(BaseArea record);
	
	/**
	 * 省市区树形结构
	 */
	List<BaseAreaTreeNodeVO> baseAreaTreeJson();
	
	List<BaseAreaLeafDTO> baseAreaLeafJson(@Param("parentId") String parentId);
	
}